<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./lib/vue-2.4.0.js"></script>
    <script src="./lib/vue-router-3.0.1.js"></script>
</head>

<body>
    <div id="app">
        <a href="#/login/12">login</a>
        <router-view></router-view>
    </div>

    <script>
        var login = {
            template: "<h1>哈哈哈</h1>",
            created() {
                console.log(this.$route.query)
                console.log(this.$route.params.id)
            },
        }
        var rout = new VueRouter({
            routes: [{
                path: "/login/:id",
                component: login
            }]
        })
        var vm = new Vue({
            el: '#app',
            data: {},
            methods: {},
            router: rout
        });
    </script>
</body>

</html>